package com.dreamthen.service.impl;

import com.dreamthen.dao.IUserDao;
import com.dreamthen.entity.User;
import com.dreamthen.service.IMyUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author zengms
 * @Date 2023-10-29 10:34:56
 **/
@Service
public class MyUserServiceImpl implements IMyUserService {

    @Autowired
    private IUserDao iUserDao;

    @Override
    public User query(String id) {
        try {
            User user = iUserDao.getUser(id);
            return user;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public List<User> query() {
        return iUserDao.query();
    }

    @Override
    public void updateUser() {
        System.out.println("***my-updateUser****");
    }
}
